import java.util.Scanner;

public class RunMe{
	public static void main(String[] args)
	{
		String name;
		boolean gender;
		Player play;
		String choice;
		
		Scanner scan = new Scanner(System.in);
		Sys.sp("Over the years and over this night");
		Sys.sp("I have sung many tales of love and delight");
		System.out.print("[ENTER]");
		scan.nextLine();
		Sys.sp("You have heard many tales before");
		Sys.sp("But this night I shall tell you one more");
		scan.nextLine();
		Sys.sp("Not of the gilded hero and Demon King");
		Sys.sp("But a fool who knows not what his heedlessness brings");
		scan.nextLine();
		Sys.sp("The fool who tied the world's noose");
		Sys.sp("The sun, moon, and devil have run loose");
		scan.nextLine();
		Sys.sp("A perilous journey he must take");
		Sys.sp("Where death and ruin follow in his wake");
		scan.nextLine();
		Sys.sp("A world of darkness he did fight");
		Sys.sp("For he alone has walked the path of light");
		scan.nextLine();
		Sys.sp("From this world will be shown");
		Sys.sp("The song that it contains, is my own");
		scan.nextLine();
		Sys.sp("============================================================");
		Sys.sp("============================================================");
		Sys.supersp("-----  |   |  |----     \\       /  /---\\  |---\\  |    |---\\");
		Sys.supersp("  |    |---|  |---       \\ /\\ /   |   |  |---/  |    |   |");
		Sys.supersp("  |    |   |  |----       V  V    \\---/  |   \\  |___ |---/");
		Sys.sp("============================================================");
		Sys.sp("============================================================");
		scan.nextLine();
		Sys.supersp("25 years earlier...");
		scan.nextLine();
		Sys.sp("And thus with the imposter Lycan subdued");
		Sys.sp("Our song of Prince Belca shall conclude");
		scan.nextLine();
		System.out.println("As the crowd dissapates, some leave some coins in your bowl");
		scan.nextLine();
		Sys.sp("50 g? That should be enough to get me through the next few days");
		System.out.println("A man walks up to you. He seems wise but has a");
		System.out.println("mischievious glimmer in his eyes");
		scan.nextLine();
		Sys.sp("My name is Oak. Your hair is long so i cant tell. Are you a boy");
		Sys.sp("or are you a girl?");
		boolean understand = false;
		while(!understand)
		{
			System.out.print(">");
			choice = scan.nextLine();
			switch(choice.toLowerCase().trim())
			{
			case "b": case "boy": case "m": case "man": case "male":
				gender = true;
				understand = true;
				Sys.sp("Oh thats what i thought. The fire in your eyes gives away everything");
				break;
			case "g": case "girl": case "f": case "female": case "w": case "woman":
				gender = false;
				understand = true;
				Sys.sp("Your hair compliments your eyes. Youre quite pretty");
				break;
			default:
				System.out.println("I dont understand");
				break;
			}
		}
		Sys.sp("I missed the start of the performance. What did you say your name was?\n>");
		name = scan.nextLine();
		Sys.sp("Sometime you should come to my lab. I have something");
		Sys.sp("that you might be interested in. Its just north of here.");
		Sys.sp("Stop by when you get the chance.");
		scan.nextLine();
		System.out.println("He walks away leaving you alone in the square. You take the");
		System.out.println("gold and pocket it. You look around the square");
		scan.nextLine();
		play = new Player(name);
		World.acoricoSquare("l");
		System.out.println("\nWould you like to see your stats? (this can be");
		System.out.print("Accessed with the command \"stats\")\n>");
		choice = scan.nextLine();
		switch(choice.toLowerCase().trim())
		{
			case "yes": case "y": case "ok": case "sure": case "stats":
				Parser.pars("stats");
			default: 
				break;
		}
		System.out.println("\nWould you like to see your equipped items? (this can be");
		System.out.print("accessed with the command \"equipped\")\n>");
		choice = scan.nextLine();
		switch(choice.toLowerCase().trim())
		{
			case "yes": case "y": case "ok": case "sure": case "equipped":
				Parser.pars("equipped");
			default: 
				break;
		}
		System.out.print("Would you like to see your objectives? (\"obj\")\n>");
		choice = scan.nextLine();
		switch(choice.toLowerCase().trim())
		{
			case "yes": case "y": case "ok": case "sure": case "obj":
				Parser.pars("obj");
			default: 
				break;
		}
		System.out.print("Would you like to see a list of avalible commands? (\"help\")\n>");
		choice = scan.nextLine();
		switch(choice.toLowerCase().trim())
		{
			case "yes": case "y": case "ok": case "sure": case "help":
				Parser.pars("help");
			default: 
				break;
		}
		System.out.println("You can view the menue with \"menue\" or \"start\"\n>");
		boolean meGivingADamn = false;
		while(!meGivingADamn)
		{
			System.out.print(">");
			String command = scan.nextLine();
			command = command.toLowerCase().trim();
			if(command.contains(" "))
			{
			command = Sys.split1(command);
			Parser.setParam(Sys.split2(command));
			}
			World.go(command);
		}
	}	
}
